Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove structural links #999

Merged
merged 4 commits into from
Feb 22, 2023
Merged

Remove structural links #999

merged 4 commits into from
Feb 22, 2023

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Feb 21, 2023

Related Issue(s):

Description:

  • Adds remove_hierarchical_links to STACObject
  • Adds Links.is_hierarchical

I personally prefer the term "structural", but "hierarchical" was already in use so I stuck with that:

pystac/pystac/link.py

Lines 27 to 34 in a573835

HIERARCHICAL_LINKS = [
pystac.RelType.ROOT,
pystac.RelType.CHILD,
pystac.RelType.PARENT,
pystac.RelType.COLLECTION,
pystac.RelType.ITEM,
pystac.RelType.ITEMS,
]

Includes the first pytest fixture for the test cases. I went for a more descriptive catalog name (label_catalog) instead of test_case_1 -- my thought is that it'll be nicer to depend on a well-named fixture rather than some arbitrary numbering scheme. I also followed @jsignell's recommendation and remove the test_ prefix from some existing fixtures.

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@gadomski gadomski added this to the 1.7 milestone Feb 21, 2023
@gadomski gadomski requested a review from pjhartzell February 21, 2023 20:51
@gadomski gadomski self-assigned this Feb 21, 2023
@gadomski gadomski force-pushed the issues/179-remove-structural-links branch from 4957698 to 39d8040 Compare February 21, 2023 22:00
@gadomski gadomski force-pushed the issues/179-remove-structural-links branch from 39d8040 to 718cd5c Compare February 21, 2023 22:16
@gadomski gadomski added this pull request to the merge queue Feb 22, 2023
Merged via the queue into main with commit 3369028 Feb 22, 2023
@gadomski gadomski deleted the issues/179-remove-structural-links branch February 22, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing hierarchical links / add source link
2 participants